﻿// Write a program that reads a number and prints it as a decimal number, hexadecimal number, percentage and in scientific notation. 
// Format the output aligned right in 15 symbols.

using System;

public class PrintNumberInDifferentFormats
{
    public static void Main()
    {
        int number;
        string numberString;
        do
        {
            Console.Write("Enter number: ");
            numberString = Console.ReadLine();
        }
        while (!int.TryParse(numberString, out number));

        Console.WriteLine("Decimal number     : {0, 15}", number);
        Console.WriteLine("Hexadecimal number : {0,15:X}", number);
        Console.WriteLine("Percentage         : {0, 15:P}", number);
        Console.WriteLine("Scientific notation: {0, 15:E}", number);
    }
}